<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>编辑分类</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="/resource/layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="/resource/css/mylay.css">
</head>
<body>
    <div style="padding: 20px; background-color: #F2F2F2;">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12">
                <div class="layui-card">
                    <div class="layui-card-body">
                        <form class="layui-form layui-form-pane" action="">
                            <div class="layui-form-item">
                                <label class="layui-form-label">语言</label>
                                <div class="layui-input-inline">
                                    <select name="lang" lay-verify="required" lay-search="">
                                        <option value="">请选择</option>
                                        {foreach :config('custom.lang') as $key=>$value }
                                        <option value="{$key}"{if $data.lang eq $key} selected{/if}>{$value}</option>
                                        {/foreach}
                                    </select>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">账号绑定</label>
                                <div class="layui-input-inline">
                                    <select name="bind_status" lay-verify="required" lay-search="">
                                        <option value="1"{if $data.bind_status eq 1} selected{/if}>开启</option>
                                        <option value="2"{if $data.bind_status eq 2} selected{/if}>关闭</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">绑定类型</label>
                                <div class="layui-input-inline">
                                    <select name="bind_type" lay-verify="required" lay-search="">
                                        <option value="">请选择</option>
                                        {foreach :config('custom.taskTypeBindType') as $key=>$value }
                                        {if $key}
                                        <option value="{$key}"{if $data.bind_type eq $key} selected{/if}>{$value}</option>
                                        {/if}
                                        {/foreach}
                                    </select>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">绑定字段</label>
                                <div class="layui-input-inline">
                                    <select name="bind_field" lay-search="">
                                        <option value="">请选择</option>
                                        {foreach :config('custom.taskTypeBindField') as $key=>$value }
                                        {if $key}
                                        <option value="{$key}"{if $data.bind_field eq $key} selected{/if}>{$value}</option>
                                        {/if}
                                        {/foreach}
                                    </select>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">分类标题</label>
                                <div class="layui-input-block">
                                    <input type="text" name="group_name" value="{$data.group_name}" autocomplete="off" placeholder="请输入分类标题" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">首页标题</label>
                                <div class="layui-input-block">
                                    <input type="text" name="h_group_name" value="{$data.h_group_name}" autocomplete="off" placeholder="请输入分类标题" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">排序</label>
                                <div class="layui-input-block">
                                    <input type="text" name="num" value="{$data.num}" autocomplete="off" placeholder="请输入分类标题" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">状态</label>
                                <div class="layui-input-inline">
                                     <select name="state" lay-verify="required" lay-search="">
                                        <option value="1"{if $data.state eq 1} selected{/if}>开启</option>
                                        <option value="2"{if $data.state eq 2} selected{/if}>关闭</option>
                                        <option value="3"{if $data.state eq 3} selected{/if}>锁定</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">分享</label>
                                <div class="layui-input-inline">
                                    <select name="is_fx" lay-verify="required" lay-search="">
                                        <option value="1"{if $data.is_fx eq 1} selected{/if}>是</option>
                                        <option value="2"{if $data.is_fx eq 2} selected{/if}>否</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">发布</label>
                                <div class="layui-input-inline">
                                    <select name="is_f" lay-verify="required" lay-search="">
                                        <option value="1"{if $data.is_f eq 1} selected{/if}>是</option>
                                        <option value="2"{if $data.is_f eq 2} selected{/if}>否</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">图标</label>
                                <div class="layui-upload-drag pj-type-icon">
                                    <i class="layui-icon layui-icon-upload"></i>
                                    <p>点击上传，或将文件拖拽到此处</p>
                                    <div {if !$data.icon}class="layui-hide"{/if}>
                                        <hr>
                                        <img src="{$data.icon}" alt="上传成功后渲染" style="max-width: 150px">
                                        <p></p>
                                    </div>
                                </div>
                                <input type="hidden" name="icon" value="{$data.icon}" class="layui-input">
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">首页图标</label>
                                <div class="layui-upload-drag pj-type-icon">
                                    <i class="layui-icon layui-icon-upload"></i>
                                    <p>点击上传，或将文件拖拽到此处</p>
                                    <div {if !$data.h_icon}class="layui-hide"{/if}>
                                        <hr>
                                        <img src="{$data.h_icon}" alt="上传成功后渲染" style="max-width: 150px">
                                        <p></p>
                                    </div>
                                </div>
                                <input type="hidden" name="h_icon" value="{$data.h_icon}" class="layui-input">
                            </div>
                            <div class="layui-form-item layui-form-text">
                                <label class="layui-form-label">分类说明</label>
                                <div class="layui-input-block">
                                    <!-- <script id="editor" type="text/plain" style="width:1024px;height:500px;"></script> -->
                                    <!-- <textarea name="group_info" id="editor" style="width:100%;height:500px;">{$data.group_info}</textarea> -->
                                    <textarea name="group_info" placeholder="请输入内容" class="layui-textarea">{$data.group_info}</textarea>
                                </div>
                            </div>
                            <div class="layui-form-item layui-form-text">
                                <label class="layui-form-label">首页分类说明</label>
                                <div class="layui-input-block">
                                    <!-- <script id="editor" type="text/plain" style="width:1024px;height:500px;"></script> -->
                                    <!-- <textarea name="group_info" id="editor" style="width:100%;height:500px;">{$data.group_info}</textarea> -->
                                    <textarea name="h_group_info" placeholder="请输入内容" class="layui-textarea">{$data.h_group_info}</textarea>
                                </div>
                            </div>
                            <div class="layui-form-item" style="margin-top: 40px;text-align: center;">
                                <input type="hidden" name="id" value="{$data.id}" autocomplete="off" class="layui-input">
                                <div class="layui-input-block">
                                    <button class="layui-btn" lay-submit lay-filter="TaskClassEdit">立即提交</button>
                                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>

<script src="/resource/layuiadmin/layui/layui.js"></script>
<script src="/resource/js/manage/init_date.js"></script>
<script src="/resource/js/manage/bet.js"></script>

<script type="text/javascript" src="/resource/plugs/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="/resource/plugs/ueditor/ueditor.all.min.js"></script>
<!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
<!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
<script type="text/javascript" src="/resource/plugs/ueditor/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript">
//实例化编辑器
//建议使用工厂方法getEditor创建和引用编辑器实例，如果在某个闭包下引用该编辑器，直接调用UE.getEditor('editor')就能拿到相关的实例
var ue  = UE.getEditor('editor');
</script>
</body>
</html>